<?php

//判断是否来自场景体,底部菜单不变
if($_RQ['plugin_name']){
	$this->session('plugin_name',$_RQ['plugin_name']);
}
$plugin_name=$this->session('plugin_name')?$this->session('plugin_name'):'';
if($plugin_name && $plugin_name!='core'){
	$return['footernav']=$this->plugin($plugin_name)->plugin_setting('basic')['footernav'];
}
//全局返回mid
$return['mid']=$_SESSION['mid'];
$return['setting']=$this->plugin_setting('setting');
$return['shopset']=$this->plugin_setting('shopset');
$return['setting']['logo']=$return['shopset']['logo'];
$return['setting']['title']=$return['shopset']['title'];
$return['setting']['toplogo']=$return['setting']['toplogo']?:$return['setting']['logo'];
$return['setting']['no_tanmu']=$return['shopset']['no_tanmu'];
if($return['shopset']['closeshop']==1 && $_RQ['action'] !='close'){
	exi('','error','jy_weishop/close/');
}
if($_SESSION['os']=='windows'){
	$return['pc_set']=$this->plugin_setting('pc_set');
	$site=core_setting('site');
	$return['pc_set']['icp']=$return['pc_set']['icp']?:$site['icp'];
	if($this->plugin_exists('jy_merch')){
		$return['ismerch']=true;
		$return['ismerchurl']=custom_url('jy_merch/manage.login/');
	}
}
$return['current_plugin']=$_SESSION['current_plugin'];
if(!$_SESSION['store_id'] && $_RQ['is_access']){
	$storeset=$this->plugin_setting('storeset');
	if($storeset['isopen']){
		$_SESSION['store_id']=pdo_getcolumn('jy_weishop_store',array('uniacid'=>$_SESSION['uniacid'],'status'=>1),'id');
	}
}
$return['lat_lng']=$this->session('lat_lng');
$sharelink='jy_weishop/index//fromuser='.$_SESSION['uid'];
if($_RQ['is_access'] && $_SESSION['current_plugin'] && $_SESSION['current_plugin']!='jy_weishop' && $_SESSION['current_plugin']!='core'){
	if(is_file(ROOT_PLUGIN.$_SESSION['current_plugin'].'/custom/actions/index.php')){
		$sharelink=$_SESSION['current_plugin'].'/index//fromuser='.$_SESSION['uid'];
	}
}
$return['sharedata']=array(
	'title'=>$return['setting']['share_title']?$return['setting']['share_title']:'首页-在线商城',
	'desc'=>$return['setting']['share_desc']?$return['setting']['share_desc']:'在线商城，一个属于自己的个人商城！',
	'link'=>custom_url($sharelink,true),
	'imgUrl'=>tomedia($return['setting']['share_image'])
);
$return['shopindex_url']='jy_weishop/index/';
$return['groups_url']='jy_weishop/shop.groups/';
$return['memberindex_url']='jy_weishop/member.index/';
$return['goodsindex_url']='jy_weishop/goods.index/';
$return['goodsdetail_url']='jy_weishop/goods.detail/';
$return['orderlist_url']='jy_weishop/order.list/';
$return['orderdetail_url']='jy_weishop/order.detail/';
?>